<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


{% csrf_token %}
<input type="text" name="i1" value="{{ i1 }}">+
<input type="text" name="i2" value="{{ i2 }}">=
<input type="text" name="i3" value="{{ i3 }}">
<button id="b1">计算</button>

<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>

<script>
    $('#b1').click(function () {

        $.ajax({
            url:'/calc/',
            type:'get',
            data:{
                'x1':$('[name ="i1"]').val(),
                'x2':$('[name ="i2"]').val(),
            },
            success:function (data) {
                $('[name ="i3"]').val(data)
                
            }
        })
        
    })
</script>


</body>
</html>
</body>
</html>